[CK_TILE] MX GEMM, non-preshuffled and RCR layout#3709
Draft
[CK_TILE] MX GEMM, non-preshuffled and RCR layout#3709
Conversation
…eline from flatmm
ThomasNing
reviewed
Feb 11, 2026
Contributor
ThomasNing
left a comment
There was a problem hiding this comment.
Thank you for the PR @samremes Could I know when will be the estimation we could have the mxfp4 and mxfp8 working?
| (std::is_same<T, pk_fp6x16_t>::value && (N == 1)), | ||
| (N == 1 || N == 2 || N == 4 || N == 8 || N == 16 || N == 32) || | ||
| (std::is_same<T, pk_fp4_t>::value && | ||
| (N == 1 || N == 2 || N == 4 || N == 8 || N == 16 || N == 32))), |
Contributor
There was a problem hiding this comment.
The largest granularity is b128, so I don't think we need the N = 32.
| merge_sequences(sequence<1, 1>{}, b_warp_y_lengths)); | ||
|
|
||
| // get B scale for this N-K tile using get_y_sliced_thread_data | ||
| auto scale_b_slice = scale_b_tensor.get_y_sliced_thread_data( |
Contributor
There was a problem hiding this comment.
For the packed data of scale, it is better that we could use the load_tile_offset + get_thread_buffer() method
| // warp GEMM with MX scaling | ||
| // Cast e8m0_t to int32_t, use OpSel=0 (least significant byte) | ||
| constexpr index_t kOpSel = 0; // Always use OpSel=0 | ||
| WarpGemm{}.template operator()<kOpSel, kOpSel>( |
Contributor
There was a problem hiding this comment.
We could load 32 bits together and select based on the iterations.
| }); | ||
| } | ||
|
|
||
| // C += A * B with MX scaling |
Contributor
There was a problem hiding this comment.
We could migrate that to the gemm_mx block folder.
| // C Distributed tensor: register | ||
| // MX scaling support with OpSel | ||
| template <typename Problem> | ||
| struct BaseMXGemmPipelineAgBgCrCompAsync |
Contributor
There was a problem hiding this comment.
If we need, we could first limit it without async feature :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Please describe the motivation behind the pull request, whether it enables a new feature or fixes a bug. If there are associated pull requests or issues, please link them to the pull request.
Checklist
Please put an
xinto the boxes that apply. You can also fill these out after creating the PR. If you're not sure, please don't hesitate to ask.clang-formaton all changed filesDiscussion
If this is a relatively large or complex change, feel free to start a discussion by explaining why you chose the solution you did and what alternatives you considered